<!DOCTYPE html>

<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->

<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->

<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->

<!-- BEGIN HEAD -->

<head>

    <meta charset="utf-8" />

    <title>毕业生就业信息管理系统</title>

    <meta content="width=device-width, initial-scale=1.0" name="viewport" />

    <meta content="" name="description" />

    <meta content="" name="author" />

    <!-- BEGIN GLOBAL MANDATORY STYLES -->

    <link href="/graduateinfo/media/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>

    <link href="/graduateinfo/media/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>

    <link href="/graduateinfo/media/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>

    <link href="/graduateinfo/media/css/style-metro.css" rel="stylesheet" type="text/css"/>

    <link href="/graduateinfo/media/css/style.css" rel="stylesheet" type="text/css"/>

    <link href="/graduateinfo/media/css/style-responsive.css" rel="stylesheet" type="text/css"/>

    <link href="/graduateinfo/media/css/default.css" rel="stylesheet" type="text/css" id="style_color"/>

    <link href="/graduateinfo/media/css/uniform.default.css" rel="stylesheet" type="text/css"/>

    <!-- END GLOBAL MANDATORY STYLES -->

    <!-- BEGIN PAGE LEVEL STYLES -->

    <link href="/graduateinfo/media/css/login-soft.css" rel="stylesheet" type="text/css"/>

    <!-- END PAGE LEVEL STYLES -->

    <link rel="shortcut icon" href="/graduateinfo/media/image/logo.png" />
    <script src="/graduateinfo/media/js/jquery-1.10.1.min.js" type="text/javascript"></script>

    <script src="/graduateinfo/media/js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>

    <!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->

    <script src="/graduateinfo/media/js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

    <script src="/graduateinfo/media/js/bootstrap.min.js" type="text/javascript"></script>

    <!--[if lt IE 9]>

    <script src="/graduateinfo/media/js/excanvas.min.js"></script>

    <script src="/graduateinfo/media/js/respond.min.js"></script>

    <![endif]-->

    <script src="/graduateinfo/media/js/jquery.slimscroll.min.js" type="text/javascript"></script>

    <script src="/graduateinfo/media/js/jquery.blockui.min.js" type="text/javascript"></script>

    <script src="/graduateinfo/media/js/jquery.cookie.min.js" type="text/javascript"></script>

    <script src="/graduateinfo/media/js/jquery.uniform.min.js" type="text/javascript" ></script>

    <!-- END CORE PLUGINS -->

    <!-- BEGIN PAGE LEVEL PLUGINS -->

    <script src="/graduateinfo/media/js/jquery.validate.min.js" type="text/javascript"></script>

    <script src="/graduateinfo/media/js/jquery.backstretch.min.js" type="text/javascript"></script>

    <!-- END PAGE LEVEL PLUGINS -->

    <!-- BEGIN PAGE LEVEL SCRIPTS -->

    <script src="/graduateinfo/media/js/app.js" type="text/javascript"></script>

    <script src="/graduateinfo/media/js/login-soft.js" type="text/javascript"></script>
    <script src="/graduateinfo/media/js/axios.min.js" type="text/javascript"></script>
    <script src="/graduateinfo/media/layui/layui.js" type="text/javascript"></script>
    <script src="/graduateinfo/media/js/cookie.js"></script>
</head>

<!-- END HEAD -->

<!-- BEGIN BODY -->

<body class="login">

<!-- BEGIN LOGO -->
<div class="headerlogo" >
    <div class="container"style="width: 1340px;margin: 0 auto;">
        <div class="logo-icon" style="float: left;vertical-align: middle;margin-right: 40px;display: block;"><!--#begineditable clone="0" namechanged="0" order="2" ispublic="0" tagname="LOGO" viewid="190877" contentviewid="" contype="" stylesysid="" layout="" action="" name="LOGO"-->
            <!-- 网站logo图片地址请在本组件"内容配置-网站logo"处填写 -->
            <a href="" title="河南工业大学"><img src="/graduateinfo/media/image/header/header-haut.png" width="475" height="130" border="0" alt="河南工业大学" title="河南工业大学"></a><!--#endeditable--></div>
        <div class="theme" style="float: left;vertical-align: middle;display: block;"><!--#begineditable clone="0" namechanged="0" order="3" ispublic="0" tagname="图片列表logo旁" viewid="190879" contentviewid="" contype="" stylesysid="" layout="" action="" name="图片列表logo旁"-->


            <img src="/graduateinfo/media/image/header/header-logo2.png" border="0" width="450" height="130">


            <!--#endeditable--></div>
        </div>
</div>
<!--<div class="logo">-->

<!--    <img src="/graduateinfo/media/image/logo.png" alt="" />-->

<!--</div>-->

<!-- END LOGO -->

<!-- BEGIN LOGIN -->

<div class="content">

    <!-- BEGIN LOGIN FORM -->

    <form class="form-vertical login-form" method="post" onsubmit="return false">

        <h3 class="form-title">欢迎进入毕业生信息管理系统</h3>

        <div class="alert alert-error hide">

            <button class="close" data-dismiss="alert"></button>

            <span>Enter any username and password.</span>

        </div>

        <div class="control-group">
            <label for="login-type" style="display: block"><h4>请选择登录类型：</h4></label>
            <select style="display: block;width: 340px" id="login-type" name="login-type">
                <option value="enterprise">企业登录</option>
                <option value="school">学校登录</option>
                <option value="college">学院登录</option>
                <option value="student">学生登录</option>
            </select>
            <label class="control-label visible-ie8 visible-ie9">账号</label>

            <div class="controls">

                <div class="input-icon left">

                    <i class="icon-user"></i>

                    <input class="m-wrap placeholder-no-fix" type="text" placeholder="请输入您的账户" name="username" id="username"/>

                </div>

            </div>

        </div>

        <div class="control-group">

            <label class="control-label visible-ie8 visible-ie9">密码</label>

            <div class="controls">

                <div class="input-icon left">

                    <i class="icon-lock"></i>

                    <input class="m-wrap placeholder-no-fix" type="password" placeholder="请输入密码" name="password" id="password"/>

                </div>

            </div>

        </div>

        <div class="form-actions">

            <label class="checkbox">

                <input type="checkbox" name="remember" value="1"/> 记住我

            </label>

            <button class="btn blue pull-right" onclick="submit_form()" >

                Login <i class="m-icon-swapright m-icon-white"></i>

            </button>
            <div class="create-account">

                <button class="btn blue pull-left">忘记密码</button>
                <button class="btn blue pull-right">注册</button>

            </div>

        </div>

    </form>

</div>
<script src="/graduateinfo/media/api/login.js"></script>
<script>
    var layer = undefined

    function submit_form(){
        var type = $('#login-type').val()
        var username = $('#username').val()
        var password = $('#password').val()

        if (type === 'enterprise'){
            //企业登录
            LoginApi.companyLogin(username,password).then(res=>{
                setCookie('uid',username,7)
                console.log(res)
                window.location.href =
                    `http://${window.location.host}/graduateinfo/views/company/gra_info.html`
            })
        } else if (type === 'school'){
            //学校登录
            LoginApi.schoolLogin(username,password).then(res=>{
                setCookie('uid',username,7)
                console.log(res)
                window.location.href =
                    `http://${window.location.host}/graduateinfo/views/school/workInfo.html`
            })
        } else if (type === 'college'){
            //学院登录
            LoginApi.collegeLogin(username,password).then(res=>{
                console.log(res)
                setCookie('uid',username,7)
                window.location.href =
                    `http://${window.location.host}/graduateinfo/views/college/workInfo.html`
            })
        } else if (type === 'student'){
            //学生登录
            LoginApi.studentLogin(username,password).then(res=>{
                setCookie('uid',username,7)
                const data = res.data
                if (data.statusCode === 200){
                    window.location.href =
                        `http://${window.location.host}/graduateinfo/views/student/index.html`
                }
            }).catch(err=>{
                console.log(err)
                layui.use(['layer'], () => {
                    layer = layui.layer
                    layer.msg(err.message)
                })
            })
        }

        // return false;
    }

    jQuery(document).ready(function() {

        App.init();

        Login.init();

    });

</script>


<!-- END PAGE LEVEL SCRIPTS -->



<!-- END JAVASCRIPTS -->

</body>

<!-- END BODY -->

</html>

<style>
    .headerlogo {
        background: #1B4F80;
        background-image: initial;
        background-position-x: initial;
        background-position-y: initial;
        background-size: initial;
        background-repeat-x: initial;
        background-repeat-y: initial;
        background-attachment: initial;
        background-origin: initial;
        background-clip: initial;
        background-color: rgb(27, 79, 128);
        color: #fff;
        border-bottom: 1px solid #B8C5D1;
        border-bottom-width: 1px;
        border-bottom-style: solid;
        border-bottom-color: rgb(184, 197, 209);
        display: block;
        margin: 0px;
    }
</style>
